<article>
    <?php foreach ($getAllCategory as $getAllCategorys):?>
    <div class="product-group">
        <div class="task">
            <h2 class="title"><a href="<?= base_url($getAllCategorys['url']) ?>"><?php echo $getAllCategorys['cate_name'] ?></a></h2>
            <span class="view-more-button"><span class="button">&gt;&gt;</span>&nbsp;<a href="<?= base_url($getAllCategorys['url']) ?>">Xem tất cả</a></span>
        </div>
        <div class="content">
            <?php $i = 0; foreach ($getAllProduct as $getAllProducts): $i++;?>

            <?php if($getAllProducts['cate_id'] == $getAllCategorys['cate_id'] && $getAllProducts['athome'] == 1){ ?>
            <?php if ($i < 4){ echo '<div class="pro-item ">'; }else{echo  '<div class="pro-item last ">';}?>
                <div class="thumb">
                    <a href="<?php echo base_url(). mb_strtolower(url_title(removesign( $getAllProducts['title']))).'.html';?>"><img src="<?= $getAllProducts['img1'] ?>" alt="Tên sản phẩm" title="Tên sản phẩm"></a>
                </div>
                <div class="detail">
                    <h3 class="name"><a href="<?php echo base_url(). mb_strtolower(url_title(removesign( $getAllProducts['title']))).'.html';?>"><?= $getAllProducts['title'];?></a></h3>
                    <span><?php echo number_format($getAllProducts['price']);?> VNĐ</span><br>
                    <a class="view-more" href="<?php echo base_url(). mb_strtolower(url_title(removesign( $getAllProducts['title']))).'.html';?>">Xem chi tiết</a>
                </div>
            </div><!--End .pro-item-->
            <?php }; endforeach;?>
        </div>
    </div><!--End .product-group-->
    <?php endforeach ?>
</article>